class Solution(object):
    def findWords(self, words):
        """
        :type words: List[str]
        :rtype: List[str]
        """
        rows = [set('qwertyuiop'), set('asdfghjkl'), set('zxcvbnm')]
        res = []
        for word in words:
            lower_word = word.lower()
            for row in rows:
                # if set(lower_word) & row == set(lower_word):
                if set(lower_word).issubset(row):
                    res.append(word)
        return res
if __name__ == '__main__':
    words = ["Hello", "Alaska", "Dad", "Peace"]
    print(Solution().findWords(words))
